<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>房间管理</title>
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div style="margin:0 auto; width:800px; height:600px; margin-top:99px;">
 <div class="row">
    <div class="span7 offset1">
<form class="form-horizontal well" action="/room/${action}">
<legend>
<%if(action=="add"){%>
房间添加
<%}else{%>
房间修改
<%}%>
</legend>
<div class="control-group">
            <label class="control-label" for="textarea">房间号</label>
            <div class="controls">
            <%if(action=="add"){%>
               <input name="roomnumber" type="text" class="input-xlarge" value="${room.roomnumber!}" />       
            <%}else{%>
              <input name="roomnumber" type="text" class="input-xlarge" value="${room.roomnumber!}" readonly="readonly"/>
            <%}%>
            </div><br />
            <label class="control-label" for="textarea">房间类型</label>
            <div class="controls">
            <select id="select01" name="roomtype">
             	<% for (roomtype in roomtypes) {%>
             		<% if(action=="update"&&roomtype.roomtype==room.roomtype) {%>
                	<option value="${roomtype.roomtype}" selected>${roomtype.note!}</option>
                	<%}else{%>
                	<option value="${roomtype.roomtype}" >${roomtype.note!}</option>
                	<% } %>
                <% } %>
              </select>           
<!--              <input name="roomtype" type="text" class="input-xlarge" value="${room.roomtype!}"/> -->
            </div><br />
            <label class="control-label" for="textarea">房间说明</label>
            <div class="controls">
             <input name="roomnote" type="text" class="input-xlarge" value="${room.roomnote!}"/>
            </div><br /><input type="hidden" name="roomid" value="${room.roomID!}"/>
             <div class="form-actions">
            <button class="btn-large" type="submit">保存</button>
             <button type="reset" class="btn">取消</button>
            </div>
</div>
</form>
	</div>
  </div>
</div>

</body>
</html>
